﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Testify
{
    public partial class ViewGrades : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            foreach (string i in Session.Contents)
            {
                if (i == "isTakingTest")
                    if ((bool)Session["isTakingTest"] == true)
                        Response.Redirect("~/Tests/TakeTest.aspx");
            }
        }

        protected void lnkView_Click(object sender, EventArgs e)
        {
            LinkButton lnkView = (LinkButton)sender;

            Session["takeTest_id"] = lnkView.CommandArgument;
            Session["assign_id"]   = lnkView.CommandName;

            Response.Redirect("GradedTest.aspx");
        }
    }
}